package com.pig4cloud.pig.village.villager.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.pig.village.api.dto.VillagerDTO;
import com.pig4cloud.pig.village.api.dto.FamilyLeaderDTO;
import com.pig4cloud.pig.village.api.dto.VillagerSelect;
import com.pig4cloud.pig.village.api.entity.Villager;
import com.pig4cloud.pig.village.api.request.VillagerSearch;

import javax.swing.*;
import java.util.List;

/**
 * @author limbray.li
 * @date 2021/6/26
 */
public interface IVillagerService extends IService<Villager> {

	List<VillagerSelect> listAllSelect();
	List<VillagerSelect> listByFamilyIdSelect(Long familyId);
	List<VillagerSelect> listByTeamIdSelect(Long teamId);
	IPage<VillagerDTO> pageBySearch(Page page, VillagerSearch search);
	boolean addOrUpdateVillager(VillagerDTO villagerInfo);
	List<FamilyLeaderDTO> listAllFamilyLeader();

	/**
	 * 常住人口
	 * @return
	 */
	Integer resideTotal();

	/**
	 * 非常住人口
	 * @return
	 */
	Integer nonResidentTotal();

	/**
	 * 低收入
	 * @return
	 */
	Integer lowIncomeTotal();
	/**
	 * 农民
	 * @return
	 */
	Integer farmerTotal();
	/**
	 * 党员
	 * @return
	 */
	Integer partyTotal();
}
